from django.contrib import admin

# Register your models here.
from users.models import UserProfile

#  定义管理集 定义显示哪些字段 通过注册显示出来
class UserProfileAdmin(admin.ModelAdmin):
    # 展示哪些字段
    list_display = ('id','username','nick_name','phone','gender')
    # 通过哪些字段搜索
    search_fields = ('username','nick_name')
    # 过滤器
    list_filter = ('gender',)
    # 排序
    ordering = ('id',)
    # 分页
    list_per_page = 10

admin.site.register(UserProfile,UserProfileAdmin)